package net.neptech.controller;

import net.neptech.model.appointment.Appointment;
import net.neptech.model.appointment.MedicalCase;
import net.neptech.service.MedicalCaseService;
import net.neptech.vm.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @Author: liyuxiang
 * @Date: 2025/8/23 13:30
 * @Description: 医疗病例接口
 */
@RestController
@RequestMapping("/medical/case")
public class MedicalCaseController {
    @Autowired
    private MedicalCaseService medicalCaseService;

    @GetMapping("list")
    public ResponseResult<List<MedicalCase>> list(Long[] deptIds) {
        List<MedicalCase> medicalCaseList = medicalCaseService.list(deptIds);
        return ResponseResult.success(medicalCaseList);
    }
    @PostMapping()
    public ResponseResult<Void> add(@RequestBody MedicalCase medicalCase) {
        medicalCaseService.add(medicalCase);
        return ResponseResult.success();
    }
}
